"use strict";
// boolean
var isDone = false;
// let createdByNewBoolean: boolean = new Boolean(1);
var createdByNewBoolean1 = Boolean(1);
console.log(createdByNewBoolean1);
// number
var decLiteral = 5;
//16进制
var hexLiteral = 0x000d;
//2进制
var binaryLiteral = 10;
//8进制
var octalLiteral = 484;
var notANumber = NaN;
var infinityNumber = Infinity;
// 字符串
var myName = 'Tom';
var myAge = 25;
// 模板字符串
var sentence = "hello, my name is " + myName + ".\nI'll be " + (myAge + 1) + " years old next month";
// 空值
function alertName() {
    alert('My name is Tom');
}
var unsable = undefined;
// Null 和 Undefined
var u = undefined;
var n = null;
// 任意类型
var myFavoriteNumber = 'seven';
myFavoriteNumber = 7;
var anyThing = 'hello';
// 在任意值上访问任何属性都是允许的,ts不会报错,但是运行到js 如果没有的话就会报错
// console.log(anyThing.myName);
// console.log(anyThing.myName.firstName);
// anyThing.setName('Jerry');
// anyThing.setName('Jerry').sayHello();
// anyThing.myName.setFirstName('Cat');
// 未声明类型的变量§
// 变量如果在声明的时候，未指定其类型，那么它会被识别为任意值类型：
var something; //let something: any;
something = 'seven';
something = 7;
//类型推论
//如果没有明确的指定类型，那么 TypeScript 会依照类型推论（Type Inference）的规则推断出一个类型。
var aaNumber = 9;
aaNumber = 'nine';
//如果定义的时候没有赋值，不管之后有没有赋值，都会被推断成 any 类型而完全不被类型检查：
var aaAny;
aaAny = 2;
aaAny = "xc2";
aaAny = false;
